In recent years, voice-based virtual assistants (referred to herein as simply “virtual assistants”) have become a popular feature on electronic devices such as smartphones, smart speakers, media streaming devices, televisions, and so on. Generally speaking, a virtual assistant is a software program that understands natural language voice commands and can process those commands in order to complete tasks for and/or provide information to users. For instance, according to one implementation, a user can say a predefined trigger word or phrase, known as a wake word, immediately followed by a voice query or command. The virtual assistant will usually be listening for the wake word in an always-on modality. Upon detecting an utterance of the wake word, the virtual assistant can recognize the follow-on voice query or command (e.g., “what is the weather today?” or “play music by Michael Jackson”) using a combination of speech recognition and artificial intelligence (AI) techniques. The virtual assistant can then act upon the voice query/command and return a verbal response, if appropriate, to the user (e.g., “today will be mostly sunny with a high of 82 degrees” or “ok, now playing Thriller by Michael Jackson”).
Typically, the volume level of a virtual assistant's sound output is set manually by a user based on the environment in which the virtual assistant is used. For example, if the virtual assistant is used in a relatively quiet environment such as a home, the user may set the virtual assistant's sound output to a low volume level. While this manual approach for volume adjustment is functional, it can be cumbersome if the acoustic conditions surrounding the virtual assistant and/or its user change often. In these scenarios, the user will need to frequently adjust the virtual assistant's volume level so that it suitable for current conditions (i.e., loud enough to be heard, but not too loud).